﻿using Newtonsoft.Json.Linq;
using System.Collections.Generic;

namespace StoreTools.Common
{
    /// <summary>
    /// 任务
    /// </summary>
    public class PlayerTask
    {
        public PlayerTask() { }

        private JObject pathConfig;

        private JObject pwSettingConfig;

        private string rootPath;

        private string type;

        private string user;
        
        private string password;
        
        private string id;

        private string modelBaby;

        private string title;
        
        private int count;

        private int delay;

        private string cookie;

        private string logPath;

        private int timeInterval;

        private int save;

        private int titleDelay;

        private List<string> titleList;

        private List<string> picList;

        private Dictionary<string,string> carMap = new Dictionary<string, string>();

        /// <summary>
        /// 获取网店类型
        /// </summary>
        public string Type { get => type; set => type = value; }
        /// <summary>
        /// 账号
        /// </summary>
        public string User { get => user; set => user = value; }
        /// <summary>
        /// 密码
        /// </summary>
        public string Password { get => password; set => password = value; }
        /// <summary>
        /// 账号ID
        /// </summary>
        public string Id { get => id; set => id = value; }
        /// <summary>
        /// 模板宝贝ID
        /// </summary>
        public string ModelBaby { get => modelBaby; set => modelBaby = value; }
        /// <summary>
        /// 标题文件
        /// </summary>
        public string TitlePath { get => title; set => title = value; }
        /// <summary>
        /// 发布数量
        /// </summary>
        public int Count { get => count; set => count = value; }
        /// <summary>
        /// 获取浏览器导航
        /// </summary>
        public JObject PathConfig { get => pathConfig; set => pathConfig = value; }
        /// <summary>
        /// 发布延迟
        /// </summary>
        public int Delay { get => delay; set => delay = value; }
        /// <summary>
        /// 宝贝标题列表
        /// </summary>
        public List<string> TitleList { get => titleList; set => titleList = value; }
        /// <summary>
        /// 车型图片列表
        /// </summary>
        public List<string> PicList { get => picList; set => picList = value; }
        /// <summary>
        /// 车型图片：车型标题，导航
        /// </summary>
        public Dictionary<string, string> CarMap { get => carMap; set => carMap = value; }
        /// <summary>
        /// 登录记录文件名
        /// </summary>
        public string Cookie { get => cookie; set => cookie = value; }
        /// <summary>
        /// 已使用标题地址
        /// </summary>
        public string LogPath { get => logPath; set => logPath = value; }

        /// <summary>
        /// playwrigth 初始配置
        /// </summary>
        public JObject PwSettingConfig { get => pwSettingConfig; set => pwSettingConfig = value; }
        
        /// <summary>
        /// 网店发布间隔时间
        /// </summary>
        public int TimeInterval { get => timeInterval; set => timeInterval = value; }

        /// <summary>
        /// 保存登录记录
        /// </summary>
        public int Save { get => save; set => save = value; }

        /// <summary>
        /// 设置/获取 标题输入延迟
        /// </summary>
        public int TitleDelay { get => titleDelay; set => titleDelay = value; }

        /// <summary>
        /// 标题文件目录
        /// </summary>
        public string RootPath { get => rootPath; set => rootPath = value; }
    }
}
